home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / MSTSCS.CH_ / mstscs.chm / shared.js < prev   
Encoding:
Text File  |  2003-02-21  |  71.6 KB  |  1,941 lines

  1. // Filename: shared.js
  2. // Version shared.js for windows.net
  3. // version for 2.2.3
  4.  
  5. //************************************************ Shared components path setting *****************************************
  6. //*******************************************************************************************************************
  7. //    Date   11/07/01
  8. //  
  9.  
  10. set_path = "" + document.URL
  11. ntshared = set_path.indexOf("::/")
  12.  
  13. if (ntshared == -1) {
  14.     var moniker= "ms-its:";                  
  15.     var sSharedCHM = moniker+"mstsc.chm::/";         
  16.     }                                                    
  17. else
  18.     {
  19.     path = set_path.substring(0,ntshared)
  20.     path = path.toLowerCase()
  21.     ntshared = path.lastIndexOf("\\")
  22.     var moniker = path.substring(0,ntshared)+ "\\";
  23.     //var ntshared = moniker.lastIndexOf("\\")
  24.     //var moniker = moniker.substring(0,ntshared) + "\\";
  25.     var sSharedCHM= moniker+"mstsc.chm::/";
  26.     }
  27.  
  28.  
  29.  
  30.  
  31. //************************************************ EVENT HANDLING ********************************************
  32. //*******************************************************************************************************************
  33. //  re-directs to the proper event-driven functions.
  34.  
  35. // window.onload = load_object;
  36. window.onload = loadPage;
  37. document.onclick= onclickTriage;
  38. document.onmouseover= gettingHot;
  39. document.onmouseout= gettingCold;
  40. window.onunload=saveChecklistState;
  41. window.onresize= resizeDiv;
  42.  
  43. window.onbeforeprint = set_to_print;
  44. window.onafterprint = reset_form;
  45.         
  46. //********************************************  USER-DEFINED GLOBAL VARIABLES  ************************************
  47. //********************************************************************************************************************
  48. //  The images listed below can all be changed by the user.
  49. var isIE5 = (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  50. var isIE55 = (navigator.appVersion.indexOf("MSIE 5.5")>0);
  51. if (isIE5 && isIE55) isIE5 = false;
  52. var isIE6 = (navigator.appVersion.indexOf("MSIE 6")>0);
  53. var isIE4 = (navigator.appVersion.indexOf("MSIE 4")>0);
  54.  
  55. if (isIE4){
  56.     var moniker= "ms-its:";                                         // moniker= ""; for flat files
  57.     var sSharedCHM= moniker+"ntshared.chm::/";
  58. }
  59.  
  60.  
  61. if (!isIE5 && !isIE55 && !isIE4 && !isIE6) {
  62.     isIE6 = true;
  63.     }
  64.  
  65.  
  66. var sShortcutTip= "";
  67.  
  68. var gifwithin = false;
  69.  
  70.  
  71.  
  72. if(!isIE4){
  73.     xmldoc = new ActiveXObject("microsoft.XMLDOM");
  74.     xmldoc.async = false;
  75.     xmldoc.load(sSharedCHM + "alttext.xml");
  76.  
  77.     var Alt_sPreviousTip= xmldoc.getElementsByTagName("sPreviousTip")
  78.     var Alt_sNextTip= xmldoc.getElementsByTagName("sNextTip")
  79.     var Alt_sExpandTip= xmldoc.getElementsByTagName("sExpandTip")
  80.     var Alt_sPopupTip= xmldoc.getElementsByTagName("sPopupTip")
  81.     var hld_path2reuse= xmldoc.getElementsByTagName("path2reuse")
  82.     var hld_path2glossary= xmldoc.getElementsByTagName("path2glossary")
  83.     var hld_rel_gif = xmldoc.getElementsByTagName("reltopgif")
  84.     var hld_chmName = xmldoc.getElementsByTagName("chmName")
  85.     var hld_emailer = xmldoc.getElementsByTagName("emailer")
  86.     var hld_sendtext = xmldoc.getElementsByTagName("sendtext")
  87.     var hld_sendto = xmldoc.getElementsByTagName("sendto")
  88.     
  89.     //<SMARTHELP>
  90.  
  91.    var defaultStartMode;
  92.    var defaultCPanelMode;
  93.    var smartErrorTextNode;
  94.    var smartErrorText;
  95.    var xmldocSKUSettings;
  96.  
  97.    // Grab the ALTTEXT.XML enteries for smart span classes.
  98.    // Get SKU specific defaults.
  99.    var defaultSKUSettingsURL = xmldoc.documentElement.selectSingleNode("smartreusabletext");
  100.    if (defaultSKUSettingsURL != null) {
  101.       if (defaultSKUSettingsURL.text == sSharedCHM + "alttext.xml") {
  102.           xmldocSKUSettings = xmldoc;
  103.       } else {
  104.          xmldocSKUSettings = new ActiveXObject("microsoft.XMLDOM");
  105.          xmldocSKUSettings.async = false;
  106.          xmldocSKUSettings.load(moniker + defaultSKUSettingsURL.text);
  107.       }
  108.       if (xmldocSKUSettings.documentElement != null) {
  109.          defaultStartMode = xmldocSKUSettings.documentElement.selectSingleNode("smartstartdefault");
  110.          defaultCPanelMode = xmldocSKUSettings.documentElement.selectSingleNode("smartcpaneldefault");
  111.          smartErrorTextNode = xmldocSKUSettings.documentElement.selectSingleNode("smarterrortext");
  112.          smartErrorText = smartErrorTextNode ? smartErrorTextNode.text : "XOXOX";
  113.       }
  114.    } // (defaultSKUSettingsURL != NULL)
  115.  
  116. //</SMARTHELP>
  117.  
  118.     
  119.     var sPreviousTip="" + Alt_sPreviousTip.item(0).nodeTypedValue
  120.     var sNextTip="" + Alt_sNextTip.item(0).nodeTypedValue
  121.     var sExpandTip="" + Alt_sExpandTip.item(0).nodeTypedValue
  122.     var sPopupTip="" + Alt_sPopupTip.item(0).nodeTypedValue
  123.     var path2reuse="" + hld_path2reuse.item(0).nodeTypedValue
  124.     var path2glossary="" + hld_path2glossary.item(0).nodeTypedValue
  125.     var rel_gif="" + hld_rel_gif.item(0).nodeTypedValue
  126.     var chmName="" + hld_chmName.item(0).nodeTypedValue+"::/"
  127.     var emailer="" + hld_emailer.item(0).nodeTypedValue
  128.     var sendtext="" + hld_sendtext.item(0).nodeTypedValue
  129.     var sendto="" + hld_sendto.item(0).nodeTypedValue
  130.     
  131. var xmldom = new ActiveXObject("microsoft.XMLDOM");
  132.     xmldom.async = false;
  133.     
  134. //if (!xmlLoaded) {
  135.  
  136.             xmldoc = new ActiveXObject("microsoft.XMLDOM");
  137.  
  138.             // Init Properties
  139.             xmldoc.async = false;
  140.             xmldoc.validateOnParse = false; // improve perf
  141.             xmldoc.resolveExternals = false;
  142.             xmldoc.preserveWhiteSpace = false;
  143.  
  144.             // Load Document
  145.             xmldoc.load(moniker + path2reuse + "reusable.xml");
  146.             // if (xmldoc == null || xmldoc.documentElement == null) return;     // couldn't open reusable.xml
  147.             xmlLoaded = true;
  148. //         }
  149.  
  150. } // skip all this because ie4 doesn't support xml.
  151. else
  152. {
  153. var sPreviousTip="" 
  154.     var sNextTip=""
  155.     var sExpandTip=""
  156.     var sPopupTip=""
  157.     var rel_gif="no"
  158. }
  159.  
  160. var closed = sSharedCHM + "plusCold.gif";            //image used for collapsed item in callExpand()
  161. var closedHot = sSharedCHM + "plusHot.gif";            //hot image used for collapsed item in callExpand()
  162. var expand = sSharedCHM + "minusCold.gif";            //image used for expanded item in callExpand()
  163. var expandHot = sSharedCHM + "minusHot.gif";        //hot image used for expanded item in callExpand()
  164.  
  165. var previousCold= sSharedCHM + "previousCold.gif";
  166. var previousHot= sSharedCHM + "previousHot.gif"; 
  167. var nextCold= sSharedCHM + "nextCold.gif";
  168. var nextHot= sSharedCHM + "nextHot.gif"; 
  169.  
  170. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  171. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  172.  
  173. var popupCold= sSharedCHM + "popupCold.gif";
  174. var popupHot= sSharedCHM + "popupHot.gif";
  175.  
  176. var emptyImg= sSharedCHM + "empty.gif";        //image used for empty expand
  177. var noteImg= sSharedCHM + "note.gif";            //image used for notes
  178. var tipImg= sSharedCHM + "tip.gif";            //image used for tips
  179. var warningImg= sSharedCHM + "warning.gif";        //image used for warnings
  180. var cautionImg= sSharedCHM + "caution.gif";        //image used for cautions
  181. var importantImg= sSharedCHM + "important.gif";        //image used for important notice
  182. var relTopicsImg= sSharedCHM + "rel_top.gif";        //image used for important notice
  183.  
  184. var branchImg= sSharedCHM + "elle.gif";
  185. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  186.  
  187.  
  188. //********************************************  GLOBAL VARIABLES  ******************************************
  189. //********************************************************************************************************
  190.  
  191. var joejoe = false;
  192. var printing = false;
  193. var single = "FALSE";
  194. var scroller = "FALSE";
  195. var valet = "FALSE";
  196. var isRTL= (document.dir=="rtl");
  197. var imgStyleRTL= ""; 
  198.       if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  199.  
  200. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'";        //Tabular Data Control  for  reusable text data
  201. var sSharedReusableTextFile= sSharedCHM + "reusable.xml";                                        // common reusable text file
  202. var sSharedReusableTextFileRecord= "para";                                                        //reusable text record
  203.  
  204. var numbers= /\d/g;                //javascript regular expression
  205. var spaces= /\s/g;                //javascript regular expression
  206. var semicolon= /;/g;            //javascript regular expression
  207.  
  208. var isPersistent= false;
  209.  
  210.  
  211.  
  212.     
  213. //********************************************  INITIALIZATION  *************************************************
  214. //******************************************************************************************************************
  215. function list_them(){
  216.         
  217.     var envelope = sSharedCHM +'envelope.gif';
  218.     var server = "<DIV Class='FeedbackBar'><SPAN Class='webOnly'><IMG  SRC=" + envelope + " ALT='' BORDER='0'></SPAN><SPAN Class='webOnly' Style='position:relative; top:-1; left:1; color:#333333;'> " + sendtext + " "; 
  219.     server += "<a href='mailto:" + sendto + "?subject=HELP: ";
  220.     server += document.title + "'";
  221.     server += ">" + sendto + "</a></SPAN></DIV>";
  222.     
  223.     var i;
  224.  
  225.     for (i=0; i < document.all.length; i++){
  226.         if ((document.all[i].tagName == "P") ||
  227.             (document.all[i].tagName == "H1")||
  228.             (document.all[i].tagName == "H6")){
  229.             document.all[i].outerHTML = server + document.all[i].outerHTML;
  230.             i = document.all.length;
  231.             }
  232.         }
  233. }
  234. //*** loadPage **********************************************************************************************
  235. //  Adds the default image tags and re-usable text to the HTML page.
  236.  
  237. function loadPage(){
  238. if (printing == true) return;
  239.  
  240. if (emailer == "yes" ) list_them();
  241.  
  242. isPersistent= (document.all.item("checklist")!=null) && ((isIE5) || (isIE55) ||(isIE6));
  243.  
  244.   setPreviousNext();
  245.   
  246.   resizeDiv();
  247.   if (isPersistent) getChecklistState();
  248.    
  249.      load_object();
  250.     addReusableText();
  251.     
  252.     insertImages();
  253. }
  254.  
  255. //****** setPreviousNext  ************************************************************************ ********************************************************************************************* 
  256. // insert previous/next navbar
  257. // called by: <div id="nav">@@HTMLsequenceFile.txt or .lst@@</div>
  258.  
  259. function setPreviousNext(){
  260.  
  261.   var oNav = document.all.item("nav");
  262.         if (oNav == null ) return;
  263.   
  264.   var sPreviousALT= sPreviousTip;
  265.   var sNextALT= sNextTip;
  266.   var sHTMLfile= oNav.innerHTML;
  267.  
  268.   var imgPrev= "<IMG SRC='"+previousCold+"' BORDER=0 ALT='"+ sPreviousALT +"' ALIGN='top' "+ imgStyleRTL +">";
  269.   var imgNext= "<IMG SRC='"+nextCold+"' BORDER=0 ALT='"+ sNextALT  + "' ALIGN='top' "+ imgStyleRTL +">";
  270.   
  271.   var previousNextObject= "<OBJECT ID='HTMlist' WIDTH=100 HEIGHT=51 " + sActX_TDC +"><param name='DataURL' value='"
  272.         +sHTMLfile +"'><param name='UseHeader' value=True></OBJECT>";
  273.       
  274.         oNav.innerHTML= "<TABLE WIDTH='100%' STYLE='margin-top:0;' cellspacing=0>"
  275.         + "<TR><TD style='text-align=left; background-color:transparent'><A ID='previousLink' HREF='#' REL='previous' CLASS='navbar'>"
  276.         +imgPrev + "</A></TD><TD width='100%' align='center'></td><TD style='text-align=right; background-color:transparent'><A ID='nextLink' HREF='#' REL='next' CLASS='navbar'>"
  277.         +imgNext+ "</A></TD></TR></TABLE>";
  278.                     
  279.       document.body.innerHTML= document.body.innerHTML +  previousNextObject;
  280.       findPageSeq();
  281.       if (printing == true) return;
  282.       var  thisLoc= document.location.href +"#";
  283.  
  284.       if (previousLink.href== thisLoc) previousLink.style.display="none";
  285.       else  previousLink.style.display="block";
  286.  
  287.       if (nextLink.href== thisLoc) nextLink.style.display="none";
  288.       else  nextLink.style.display="block";
  289.       
  290. }
  291.  
  292. function findPageSeq() {
  293.  
  294. var rs= HTMlist.recordset;
  295. var thisLoc= document.location.href;
  296. var iLoc= thisLoc.lastIndexOf("/");
  297.  
  298.     if (iLoc > 0) thisLoc= thisLoc.substring(iLoc+1, thisLoc.length);
  299.     
  300.     
  301.     if (nav.style == "[object]") {
  302.                 nav.style.visibility="hidden";
  303.                 printing = false;
  304.                 }
  305.         else
  306.             {
  307.                 printing = true;
  308.                 return;
  309.             }
  310.     
  311.        
  312.     rs.moveFirst();
  313.        
  314.     while (!rs.EOF) {
  315.           if (thisLoc == rs.fields("HTMfiles").value){
  316.               nav.style.visibility="visible"; 
  317.                 rs.MoveNext();
  318.               break;
  319.           }
  320.           previousLink.href=rs.fields("HTMfiles").value;      
  321.           rs.moveNext();
  322.      }
  323.                 
  324.       if (!rs.EOF) nextLink.href=rs.fields("HTMfiles").value;
  325. }
  326.     
  327. //******Re-usable text ********************************************************************************************* 
  328. // Inserts the Tabular Data Control (TDC) object at the end of the page 
  329. // Inserts "re-usable text" from the txt file at: <span id="@@CHM_name@@@@index#@@" class="reuse"></span>
  330. // e.g.<span id="printing4" class="reuse"></span> for record#4 in the printing.txt in printing.chm.
  331.  
  332. // <SMARTREUSABLETEXT>
  333.  
  334. // addReusableText() - called during document load to find all references
  335. // render time bound <SPAN> contents.  Extracts content resources from reusable.xml.
  336. //
  337. // "class" names bound (reuse, smart)
  338. // "reuse" static lookup of commonly referred to text.
  339. // "smart" dynamic lookup of navigation text relevent 
  340. //         to the shell presentation of the start menu 
  341. //         and the control panel, (simple and classic), for the logged on user.
  342. //         Requires inserting custom <OBJECT> supported by Help and Support Services viewer.
  343. //         Currently not available from HTML Help control. 2000/01/12.
  344. //
  345. function smarthelperror(){
  346.     // alert("error - error")
  347.     addReusableText();
  348.     
  349.     insertImages();
  350.     return true;
  351.     // alert("error - error")
  352.     }
  353.  
  354. //var obj = window.document.createElement("OBJECT");
  355.     
  356. function load_object(){
  357.             if(!isIE6) return;
  358.             
  359.             //window.onerror = smarthelperror;
  360.         try{
  361.             var obj = window.document.createElement("OBJECT");
  362.             var sActX_PCHealth = "CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7";
  363.            objLoaded = true;    
  364.            obj.width = 1;
  365.            obj.height = 1;
  366.         
  367.            obj = document.body.insertAdjacentElement("beforeEnd", obj)
  368.            obj.id = "pchealth";
  369.            obj.classid = sActX_PCHealth;
  370.           // alert("success")
  371.           }
  372.         catch(e){}
  373.        }
  374.  
  375. function addReusableText(){
  376.     if (isIE4) return;    // no reusable text for IE4
  377.    var coll = document.all.tags("SPAN");
  378.    var xmlLoaded = false;
  379.    var control = null;
  380.    var thisID;
  381.    var strKey;
  382.    var text;
  383.  
  384.    // original error text
  385.    text = "OXO";
  386.  
  387.    //<SMARTREUSABLETEXT>
  388.    //queried state of shell presentation for start menu and control panel.
  389.    var menuSimple = false;
  390.    var controlSimple = false;
  391.  
  392.    // holds calculated lookup suffixes for smart class items.
  393.    var strSuffixStartMenuOnly = "";
  394.    var strSuffixStartMenuAndControlPanel = "";
  395.  
  396.    // smart class UserSettings Interface classid
  397.    var sActX_PCHealth = "CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7";
  398.  
  399.    // smart class lookup suffixes per shell presentation mode.
  400.    // TODO: Findout where these constants are best documented.
  401.    var strMenuClassic =   "_smclassic";
  402.    var strMenuSimple =    "_smsimple";
  403.    var strCPanelClassic = "_cpclassic";
  404.    var strCPanelSimple =  "_cpsimple";
  405.  
  406.    // only attempt to query once per rendering
  407.    var bPresentationModeQueried = false;
  408.    //</SMARTREUSABLETEXT>
  409.     span_count = coll.length;
  410.    // Check every span in the document.
  411.    for (var i=0; i< span_count; i++) {
  412.     
  413.       var thisSpan = coll[i];
  414.       var spanClass = thisSpan.className.toLowerCase();
  415.       if (spanClass == "reuse" || spanClass == "smart") {
  416.          if (isRTL) thisSpan.dir = "rtl";
  417.          if (thisSpan.id == null) break;
  418.  
  419.          // strKey is the key we'll use to look up the replaceable text in the XML file
  420.          strKey = thisSpan.id.toLowerCase();
  421.          
  422.         
  423.            
  424.          // skip smart tags when defaults are not present
  425.          if ((defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null)) {
  426.             if (spanClass == "smart") {
  427.              
  428.                // Query Presentation Mode once per rendering.
  429.                if (!bPresentationModeQueried) {
  430.                 
  431.                   bPresentationModeQueried=true;
  432.  
  433.                   // Set To Defaults
  434.                   if (defaultStartMode != null) {
  435.                      menuSimple = (defaultStartMode.text == strMenuSimple);
  436.                   } else {
  437.                      menuSimple = true;
  438.                   }
  439.  
  440.                   if (defaultCPanelMode != null) {
  441.                      controlSimple = (defaultCPanelMode.text == strCPanelSimple);
  442.                   } else {
  443.                      controlSimple = true;
  444.                   }
  445.                        
  446.                   
  447.                     
  448.                  // alert("inside of reuse")
  449.  
  450.                   // Get the current user's presentation settings
  451.                   // Attempt to read smart help values from system
  452.                   var test = window.document.all("pchealth");
  453.                   
  454.                   if (test != null) {
  455.                       
  456.                      if (test.UserSettings != null) {                        
  457.                           
  458.                    
  459.                             menuSimple = test.UserSettings.IsStartPanelOn;
  460.                     
  461.                             controlSimple = test.UserSettings.IsWebViewBarricadeOn;
  462.                                                 
  463.                         
  464.                      }
  465.                      else
  466.                      {
  467.                          menuSimple = (defaultStartMode.text == strMenuSimple)
  468.                         controlSimple = (defaultCPanelMode.text == strCPanelSimple);
  469.                     }
  470.                              
  471.                          
  472.                     
  473.                         
  474.                  }// (test != null)
  475.  
  476.               }// (!bPresentationModeQueried)
  477.  
  478.               // get the error text to display
  479.               text = smartErrorText;
  480.  
  481.               // Build key suffixes. One for start menu only and one for start menu and control panel.
  482.               strSuffixStartMenuOnly = (menuSimple ? strMenuSimple : strMenuClassic);
  483.               strSuffixStartMenuAndControlPanel = strSuffixStartMenuOnly + (controlSimple ? strCPanelSimple : strCPanelClassic);
  484.  
  485.               // The actual key could have either strSuffixStartMenuOnly or strSuffixStartMenuAndControlPanel suffixes.
  486.               // strSuffixStartMenuAndControlPanel has precedence over strSuffixStartMenuOnly
  487.               strKey = strKey + strSuffixStartMenuAndControlPanel;
  488.                 //alert(strKey)
  489.             }//if (spanClass == "smart")
  490.  
  491.          }// ((defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null))
  492.  
  493.          // Lookup XML node containing reference
  494.  
  495.          var strNodeSelector = "glossSection/entry[@entryID='" + strKey + "']/scopeDef/def";
  496.          var node = xmldoc.documentElement.selectSingleNode(strNodeSelector);
  497.  
  498.          // if we haven't found the node yet, try the other suffix if this is a smart span
  499.          if (node == null && spanClass == "smart" && (defaultSKUSettingsURL != null) && (xmldocSKUSettings.documentElement != null)) {
  500.             // one more try--use the other suffix
  501.             strKey = thisSpan.id.toLowerCase() + strSuffixStartMenuOnly;
  502.             strNodeSelector = "glossSection/entry[@entryID='" + strKey + "']/scopeDef/def";
  503.             node = xmldoc.documentElement.selectSingleNode(strNodeSelector);
  504.          }
  505.  
  506.         // okay, we found the node, get the text
  507.          // alert(coll.length)
  508.          if (node != null) {
  509.             // replace the span's contents with the reusable text
  510.             thisSpan.insertAdjacentHTML("BeforeBegin",node.text);
  511.             // var coll = document.all.tags("SPAN");
  512.             thisSpan.className = "anything"
  513.             thisSpan.innerHTML = "";
  514.             //alert(node.text)
  515.              //thisSpan.innerHTML = node.text;
  516.          } else {
  517.                  // error shown by this  OXO
  518.                thisSpan.innerHTML = text;
  519.          }
  520.         
  521.       } // if (spanClass == "reuse" || spanClass == "smart")
  522.    }// for
  523.  
  524. }// addReusableText()
  525. // <SMARTREUSABLETEXT>
  526.  
  527.  
  528. //****** insertImages ********************************************************************************************* 
  529. //  Inserts shared images in User-Defined Variables section and thumbnails.
  530. var booking = false;
  531. function insertImages(){
  532.  
  533. if (printing == false) booking = true;
  534. if (printing == true && booking == true ) {
  535.     booking = false;
  536.     return;
  537.     }
  538. // insert alert icons
  539.   var collP = document.all.tags("P");
  540.   
  541.   for (var i=0; i<collP.length; i++) {
  542.        if (collP[i].className.toLowerCase()=="note")            collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " +     collP[i].innerHTML;
  543.        else if (collP[i].className.toLowerCase()=="warning")    collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " +  collP[i].innerHTML;
  544.        else if (collP[i].className.toLowerCase()=="caution")    collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " +  collP[i].innerHTML;
  545.        else if (collP[i].className.toLowerCase()=="tip")        collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " +      collP[i].innerHTML;
  546.        else if (collP[i].className.toLowerCase()=="important")  collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  547.        else if (collP[i].className.toLowerCase()=="empty")      collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " +    collP[i].innerHTML;
  548.        if (collP[i].className.toLowerCase()=="reltopics" && rel_gif == "yes")  {
  549.             collP[i].outerHTML ="<img class='relTopics' src='"+relTopicsImg+"'> " + collP[i].outerHTML;
  550.             }   
  551.           }
  552.   
  553. //alert(printing)
  554. //alert(isIE55)
  555. //indents for Navigation Tree 
  556. var collUL = document.all.tags("UL");
  557. if (!printing) {
  558. for (var i=0; i<collUL.length; i++) {
  559.        var indent= 0;
  560.        if (collUL[i].className.toLowerCase()=="navtree"){
  561.            if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  562.            else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  563.              for (var j = 0; j < collUL[i].children.length; j++)
  564.                 if (collUL[i].children[j].className.toLowerCase()=="branch"){
  565.                     if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  566.                     else   collUL[i].children[j].style.marginLeft= (indent +'em');
  567.                     indent= indent + 0.75;
  568.                 }
  569.       }
  570. }
  571. }
  572.    
  573.   for (var i=0; i < document.anchors.length; i++){
  574.          var imgInsert="";  
  575.          var imgStyle= "";
  576.          var imgSpace= "<span class='space'></span>";      
  577.          var oBefore=document.anchors[i].parentElement.tagName;
  578.          var oAnchor= document.anchors[i].id.toLowerCase();
  579.          
  580. // insert RELTOPICS icons
  581.     if (rel_gif == "yes"){
  582.        if (oAnchor=="reltopics")
  583.                if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  584.                     imgInsert= "";    // not to re-insert when persistent
  585.             else  imgInsert= "<img class='relTopics' src='"+relTopicsImg+"'>" + imgSpace;
  586.         }
  587.         
  588. // insert SHORTCUT icons
  589.        if (oAnchor=="shortcut") {    
  590.             document.anchors[i].title= sShortcutTip;     
  591.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  592.                     imgInsert= "";    // not to re-insert when persistent
  593.             else  imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  594.         }    
  595.                       
  596. // insert POPUP icons
  597.        else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  598.        else if (document.anchors[i].className.toLowerCase()=="popupicon")
  599.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  600.                    imgInsert= "";    // not to re-insert when persistent
  601.             else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  602.  
  603. // insert EXPAND icons 
  604.        else if (oAnchor=="expand") {
  605.               document.anchors[i].title= sExpandTip;
  606.               if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  607.                   imgInsert= "";     // not to re-insert when persistent      
  608.               else{ 
  609.                   if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  610.                       imgSpace= "<span class='space' style='width:0'></span>";     
  611.                       if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em";  imgStyle=" style=margin-right:'-1.5em'";}
  612.                       else { document.anchors[i].parentElement.style.marginLeft= "1.5em";  imgStyle=" style=margin-left:'-1.5em'";}
  613.                   }      
  614.                   imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  615.               }
  616.        }
  617.  
  618.  
  619.  
  620. // insert thumbnail images       
  621.        else if (oAnchor=="thumbnail"  || oAnchor=="thumbnailweb"){ 
  622.             var sAltText = document.anchors[i].innerHTML;
  623.             gifwithin = true;
  624.             var sThumbnailText = document.anchors[i].title; 
  625.             var oImg = document.anchors[i].href.toLowerCase();
  626.                   if (oAnchor=="thumbnail") 
  627.                          var sThumbnailImg= moniker + getURL(oImg);
  628.                   else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  629.                   
  630.                  found = sAltText.indexOf("BACKGROUND-COLOR:")
  631.             if (found != -1) {
  632.                 stop_p = sAltText.indexOf(">");
  633.                 sAltText = sAltText.substring(stop_p + 1, sAltText.length);
  634.                 stop_p = sAltText.indexOf("</FONT>");
  635.                 Highlighted = sAltText.substring(0,stop_p)
  636.                 sAltText = Highlighted + sAltText.substring(stop_p + 7, sAltText.length);
  637.                 }
  638.  
  639.                   
  640.                 document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  641.                 document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  642.                 
  643.                   if (isRTL) thumbDiv.style.styleFloat= "right";
  644.            }
  645.            
  646.         
  647.         
  648.         document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  649.        if (isRTL) document.anchors[i].dir="rtl";
  650.    }
  651. }
  652.  
  653.  
  654.  
  655. //***** onclickTriage ****************************************************************************************
  656. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  657.  
  658. function onclickTriage(){
  659. var e= window.event.srcElement;
  660.  
  661. //  if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word seach,
  662. //  the parentElement is called.
  663.  
  664.     if ((isIE55 || isIE6) && printing == true) {
  665.         printing = false;
  666.         reset_form();
  667.         }
  668.         
  669.     for (var i=0; i < 5; i++)
  670.            if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  671.     eID= e.id.toLowerCase();
  672.                 
  673.     if (popupOpen) closePopup();
  674.     
  675. // expand image in a new window
  676.     if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  677.     else if (eID=="thumbnailweb") callThumbnailWeb(e);
  678.     else if (eID=="wpopup")    callPopup(e);
  679.     else if (eID=="wpopupweb") callPopupWeb(e);
  680.     else if (eID=="shortcut")  callShortcut(e);
  681.     else if (eID=="reltopics") callRelatedTopics(e);
  682.     else if (eID=="altloc")    callAltLocation(e);
  683.     else if (eID=="expand")    callExpand(e);
  684. // added to support Randy's Quad method code
  685.     else QuadDocumentClick()
  686. // ******************************
  687. }
  688.  
  689.  
  690. //*** gettingHot ****************************************************************************************
  691. // Makes all the required changes for mouseover.
  692.  
  693. function gettingHot() {
  694. var e = window.event.srcElement;
  695.     
  696.  
  697.  
  698.   if (e.id.toLowerCase()=="cold")  e.id ="hot";
  699.   else if (e.src== previousCold)  e.src = previousHot;
  700.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold)  e.children.tags("IMG")(0).src= previousHot;
  701.   else if (e.src== nextCold)  e.src = nextHot;
  702.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold)  e.children.tags("IMG")(0).src= nextHot;
  703.   
  704.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")  e.src = shortcutHot;            //<img> tags have a class
  705.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src = shortcutHot;            //<a> tags have an ID
  706.   
  707.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")  e.src = popupHot;            //<img> tags have a class
  708.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src = popupHot;            //<a> tags have an ID
  709.   
  710.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesHot(e);
  711.  
  712.  // Added to support Quad Method   **************************
  713.     if (e != null && e.firstChild != null && 
  714.         e.firstChild.tagName != null &&
  715.         e.firstChild.tagName.toLowerCase() == "input" && 
  716.         e.firstChild.type.toLowerCase() == "radio" && 
  717.         e.parentElement.className != "indentGray"){
  718.             QuadDocumentMouseOver()
  719.             }
  720.  
  721. // *****************************
  722. }
  723.  
  724. //*** gettingCold **************************************************************************************
  725. // Initial state for mouseout.
  726.  
  727. function gettingCold() {
  728. var e = window.event.srcElement;
  729.  
  730.  
  731.  
  732.   if (e.id.toLowerCase()=="hot")  e.id ="cold";
  733.   else if (e.src== previousHot)  e.src = previousCold;
  734.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousHot)  e.children.tags("IMG")(0).src= previousCold;
  735.   else if (e.src== nextHot)  e.src = nextCold;
  736.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextHot)  e.children.tags("IMG")(0).src= nextCold;
  737.   
  738.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")   e.src = shortcutCold;        //<img> tags have a class
  739.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src= shortcutCold;             //<a> tags have an ID
  740.   
  741.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")   e.src = popupCold;        //<img> tags have a class
  742.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src= popupCold;             //<a> tags have an ID
  743.   
  744.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesCold(e);
  745.   
  746.   // Added to support Quad Method   **************************
  747.     if (e != null && e.firstChild != null && 
  748.         e.firstChild.tagName != null &&
  749.         e.firstChild.tagName.toLowerCase() == "input" && 
  750.         e.firstChild.type.toLowerCase() == "radio" && 
  751.         e.parentElement.className != "indentGray"){
  752.             QuadDocumentMouseOver()
  753.             }
  754.  
  755. // *****************************
  756. }
  757.  
  758. //****************************************** OBJECT CONSTRUCTION **************************************
  759. //*****************************************************************************************************
  760. //  Uses an A tag to pass parameters between an HTML page and this script.
  761. //  Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  762. //  and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  763.  
  764. //  Object construction variables *********************************************************************
  765.  
  766. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  767. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  768.  
  769.  
  770. //*** callPopup ***************************************************************************************
  771. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  772. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  773.  
  774. var joker = false;
  775. var blague = true;
  776.  
  777. function callPopup(eventSrc) {
  778. if (popupOpen) closePopup();
  779. var ntsharedAdded= false;                    // make sure the object is only added once
  780. var CHMspecificAdded= false;                // make sure the object is only added once
  781. var coll = document.all.tags("SPAN");
  782. var sIndex,sText=" ",sFile,sFileID,dataBindingObject;
  783.  
  784.      var e= eventSrc;
  785.      var eH= unescape(e);
  786.      eH = eH.toLowerCase();
  787.      var eH_= eH.toLowerCase();
  788.      
  789.      if(event){
  790.          event.returnValue = false;
  791.         }
  792.      found = false;
  793.                                                        
  794.        var iTOPIC = eH.lastIndexOf("topic=");
  795.      if (iTOPIC==-1) return;
  796.      sParamTOPIC = eH.substring((iTOPIC+6),eH.length);
  797.      if (!isIE4){
  798.      if (!joejoe){
  799.         xmldom.load(moniker + path2glossary + "glossary.xml");
  800.         joejoe = true;
  801.         }
  802.          
  803.         var o=0;
  804.         var node = "";    
  805.         node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sParamTOPIC + "']");
  806.                     
  807.         if(node!=null)
  808.             {
  809.             
  810.             found = true;
  811.             var ralf = "";
  812.             ralf = node.getElementsByTagName("term")
  813.             sText = "<DIV CLASS='PopTerm'>" + ralf.item(0).nodeTypedValue + "</DIV>";
  814.             ralf = node.getElementsByTagName("para")
  815.             
  816.             if (ralf.length != 0){
  817.                 sText = sText + "<DIV CLASS='PopDef'>" + ralf.item(0).nodeTypedValue;
  818.                 sText = sText + "</DIV>";
  819.                 }
  820.             seealsos = node.getElementsByTagName("seeAlso");
  821.             var o=0;
  822.             
  823.             look_at = xmldom.getElementsByTagName("glossary/locSection/locItem[@locItemID = 'SeeAlso']");
  824.                         
  825.             while (o < seealsos.length){
  826.                 sIndex = seealsos.item(o).getAttribute("seeAlsoTermID");
  827.                 node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sIndex + "']");
  828.                 ralf = node.getElementsByTagName("term");
  829.                 sTerm = ralf.item(0).nodeTypedValue;
  830.                 if (o == 0) {
  831.                     sText = sText + "<DIV CLASS='PopSeeAlso'>" + look_at.item(0).nodeTypedValue + " "
  832.                     // sIndex = "<Input type=submit tabindex=1 value=hhhh onclick='jscript:alert(oPopup.sIndex.innerHTML)'>"
  833.                     sIndex = "<A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  834.                     }
  835.                 else
  836.                     {
  837.                     sIndex = ", <A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  838.                     }
  839.                 o++;
  840.                 sText = sText + sIndex 
  841.                 }
  842.                     
  843.             definition = xmldom.getElementsByTagName("glossary/locSection/locItem[@locItemID = 'See']");        
  844.             
  845.             seeentrys = node.getElementsByTagName("seeEntry");
  846.                             
  847.             while (o < seeentrys.length){
  848.                 sIndex = seeentrys.item(o).getAttribute("seeTermID");
  849.                 node = xmldom.selectSingleNode("glossary/glossSection/entry[@entryID='" + sIndex + "']");
  850.                 ralf = node.getElementsByTagName("term");
  851.                 sTerm = ralf.item(0).nodeTypedValue;
  852.                 if (o == 0) {
  853.                     sText = sText + "<DIV CLASS='PopSeeAlso'>" + definition.item(0).nodeTypedValue + " "
  854.                     // sIndex = "<Input type=submit tabindex=1 value=hhhh onclick='jscript:alert(oPopup.sIndex.innerHTML)'>"
  855.                     sIndex = "<A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  856.                     }
  857.                 else
  858.                     {
  859.                     sIndex = ", <A ID='wPopup' HREF='HELP=glossary.hlp TOPIC=" + sIndex + "' bite_me='1'>" + sTerm + "</a>"
  860.                     }
  861.                 o++;
  862.                 sText = sText + sIndex 
  863.                 }
  864.             }
  865.             
  866.             if (o != 0) sText = sText + "</DIV>" 
  867.              
  868.             if ((isIE55 || isIE6) && found){
  869.                 var oPopup = false
  870.                 var oPopup = window.createPopup();
  871.                  var strScript = "<script language='JScript'> function clickPopup(){if (event.srcElement.tagName.toLowerCase() == 'a') parent.callPopup(event.srcElement.href); window.PopObject.hide(); return false;}</script>";
  872.                   var strDoc = oPopup.document.body.outerHTML.toLowerCase()
  873.                 
  874.                   oPopup.document.write(strDoc.replace("></body>", " onclick=\"clickPopup()\">" + strScript + "</body>"));
  875.                 //oPopup.document.write(strDoc.replace("></body>", " onclick=\"clickPopup()\, onkeypress=\"process_closePopup()\">" + strScript + "</body>"));
  876.                     oPopup.document.createStyleSheet(sSharedCHM + "coUA.css");    // Apply the stylesheet.
  877.                 var oPopBody = oPopup.document.body;
  878.                 
  879.                 //oPopBody.style.backgroundColor = '#FFFFCC';
  880.                 
  881.                   // oPopBody.style.border = "solid black 1px";
  882.                   oPopBody.style.margin = "0 0 0 0";
  883.                 if (isRTL) oPopBody.innerHTML = "<SPAN DIR='RTL' class='XMLPopup'>" + sText + "</SPAN>"           // need to add the style class here.
  884.                 else oPopBody.innerHTML = "<SPAN class='XMLPopup'>" + sText + "</SPAN>"
  885.                     // alert(oPopBody.innerHTML)                
  886.                 if (window.event){
  887.                     joker = window.event.srcElement;
  888.                     }
  889.                 oPopup.show(0, 0, 400, 8, joker);    // Show the popup at an arbitrary size.
  890.                 var textSize = oPopBody.createTextRange();
  891.                 var wPop = textSize.boundingWidth + oPopBody.offsetWidth - oPopBody.clientWidth;    // Get the size of the text.
  892.                 var hPop = oPopBody.scrollHeight;
  893.                 oPopup.hide();
  894.                 oPopup.document.parentWindow.PopParent = window;
  895.                   oPopup.document.parentWindow.PopObject = oPopup;
  896.                 
  897.                   oPopup.show(0, 1, wPop , hPop, joker);
  898.                 //oPopup.document.focus(oPopup.document.body.JOKER);    
  899.                 return;
  900.                 }
  901.             
  902.             if (found){
  903.                 if (blague){
  904.                 document.body.insertAdjacentHTML("beforeEnd", "<DIV id='wPopupWeb' CLASS='popup'>" + sText + "</DIV>");
  905.                 blague = false;
  906.                 }
  907.                 window.wPopupWeb.innerHTML = sText;
  908.                 callPopupWeb(e);
  909.                 return;
  910.                 }
  911.             } // for support of IE4 disable xml popups
  912.                   
  913.    var iTOPIC = eH_.lastIndexOf("topic=");
  914.         if (iTOPIC==-1) return;
  915.         sParamTOPIC = eH.substring((iTOPIC+6),eH.length);          // extracts the topic for item2
  916.         
  917.   var iHELP = eH_.lastIndexOf("help=");
  918.         if (iHELP==-1) return;
  919.         sParamHELP = eH.substring(iHELP+5,iTOPIC);            // extracts the help file for item1
  920.         
  921.         if (document.hhPopup) document.hhPopup.outerHTML = "";    // if hhPopup object exists, clears it
  922.  
  923.  
  924.  var  h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  925.       h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  926.         
  927.         document.body.insertAdjacentHTML("beforeEnd", h);     
  928.         document.hhPopup.hhclick();
  929. }
  930.  
  931.  
  932. //*** callAltLocation******************************************************************************
  933. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  934. // called from: <A ID="altLoc" HREF="CHM=@@1st_chm_name.chm;Alt_chm_name.chm@@  FILE=@@1st_file_name.htm;Alt_file_name.htm@@">@@Link text here@@</A>
  935.    
  936.  
  937. function callAltLocation(eventSrc) {
  938. var e= eventSrc;
  939. var eH= unescape(e.href);
  940. var eH_= eH.toLowerCase();
  941. var sFILEarray,sCHMarray;
  942.      event.returnValue = false;
  943.      
  944. // var sParamTXT= e.innerHTML;
  945. //      sParamTXT= sParamTXT.replace(semicolon,"");
  946.       
  947.    var sParamTXT= "";
  948.                                        
  949.   var iFILE = eH_.lastIndexOf("file=");
  950.         if (iFILE==-1) return;
  951.         sParamFILE= eH.substring((iFILE+5),eH.length);                  // extracts the 2 HTM files
  952.         sParamFILE= sParamFILE.replace(spaces,"");
  953.         iSPLIT= sParamFILE.match(semicolon);
  954.         if (iSPLIT)
  955.               sFILEarray = sParamFILE.split(";");                                        // separates the 2 HTM files
  956.         else return;
  957.           
  958.   var iCHM  = eH_.lastIndexOf("chm=");
  959.         if(iCHM==-1) return;
  960.         else         sParamCHM = eH.substring(iCHM+4,iFILE);            // extracts the 2 CHM's
  961.         sParamCHM= sParamCHM.replace(spaces,"");
  962.         iSPLIT= sParamCHM.match(semicolon);
  963.         if (iSPLIT)
  964.             sCHMarray= sParamCHM.split(";");                                    // separates the 2 CHM's
  965.         else return;
  966.         
  967.         sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  968.                 
  969.         if (document.hhAlt) document.hhAlt.outerHTML = "";                // if hhAlt object exists, clears it
  970.  
  971.  
  972.   var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  973.       h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  974.     
  975.         document.body.insertAdjacentHTML("beforeEnd", h); 
  976.         document.hhAlt.hhclick();
  977. }
  978.  
  979.  
  980. //*** callRelatedTopics******************************************************************************
  981. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  982. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  983.    
  984.  
  985. function callRelatedTopics(eventSrc) {
  986. var e= eventSrc;
  987. var eH= unescape(e.href);
  988. var eH_= eH.toLowerCase();
  989.      event.returnValue = false;
  990.                                        
  991.   var iMETA = eH_.lastIndexOf("meta=");
  992.         if (iMETA==-1) return;
  993.         sParamMETA = eH.substring((iMETA+5),eH.length);              // extracts the META keywords for item2
  994.         
  995.   var iCHM  = eH_.lastIndexOf("chm=");
  996.         if(iCHM==-1) sParamCHM = "";
  997.         else         sParamCHM = eH.substring(iCHM+4,iMETA);            // extracts the CHM files for item1
  998.     
  999.         if (document.hhRel) document.hhRel.outerHTML = "";            // if hhRel object exists, clears it
  1000.  
  1001.  
  1002.   var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  1003.       h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  1004.     
  1005.         document.body.insertAdjacentHTML("beforeEnd", h);     
  1006.         document.hhRel.hhclick();
  1007. }
  1008.  
  1009. //*** popNewWindow***************************************************************************************
  1010. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  1011. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  1012. // the thumbnail image is loaded by loadPage();
  1013.  
  1014.  
  1015. function popNewWindow(eventSrc) {
  1016. var eH= eventSrc.href;
  1017.       event.returnValue = false;
  1018.       
  1019.  // extracts the thumbnail image URL from the <a> tag HREF
  1020.     sParamFILE =  getURL(eH);
  1021.     if (sParamFILE=="") return;
  1022.     
  1023.     // sParamFILE = moniker + sParamFILE; 
  1024.     // sParamFILE = moniker + sParamFILE; 
  1025.     //alert(sParamFILE)
  1026.     // callThumbnailWeb(sParamFFILE)
  1027.     
  1028.        
  1029.  // if the hhWindow object exists, clears it
  1030.     if (document.hhWindow) document.hhWindow.outerHTML = "";        
  1031.         
  1032. var  h =  "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  1033.      h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  1034.     
  1035.      document.body.insertAdjacentHTML("beforeEnd", h);
  1036.      document.hhWindow.hhclick();
  1037. }
  1038.  
  1039. //*** callShortcut ***************************************************************************************
  1040. // creates an object from an <A> tag, the object then calls the executable code
  1041. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=ntshared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  1042. // the shortcut image is loaded by loadInitialImg();
  1043.  
  1044. function callShortcut(eventSrc) { 
  1045. var e= eventSrc;
  1046. var eH= unescape(e.href);
  1047. var eH_= eH.toLowerCase();
  1048.  
  1049. event.returnValue = false;
  1050.               
  1051.  // extracts the error file URL from the <a> tag HREF
  1052. iEND= eH.length;
  1053. sParamFILE =  getURL(eH);
  1054.  
  1055. var iEXEC = eH_.lastIndexOf("exec="); 
  1056. var endstr = eH.lastIndexOf(",");
  1057. var sstr = eH.substring(endstr + 1, iEND);
  1058. var matchstr = "";
  1059. for(i=endstr + 1;i< iEND; i++)  //added 3/25/2002 by marissam to compensate for extra comma in shortcut calls in snippet
  1060.     matchstr = matchstr + " ";
  1061. if(sstr == matchstr)
  1062. {
  1063.     iEND = iEND - (iEND-endstr);
  1064. }
  1065.  
  1066.         if (iEXEC==-1) return;
  1067.         else sParamEXEC = eH.substring(iEXEC+5,iEND);    
  1068.         
  1069.        // alert("this is it-" + sParamEXEC + "-sParamExec");            // extracts the executable for item1
  1070.         if (document.hhShortcut) document.hhShortcut.outerHTML = "";            // if the hhShortcut object exists, clears it
  1071.     
  1072. var  h =  "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  1073.      if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  1074.      h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  1075.  
  1076.         document.body.insertAdjacentHTML("beforeEnd", h); 
  1077.         document.hhShortcut.hhclick();
  1078. }
  1079.  
  1080.  
  1081. //****************************************  EXPAND FUNCTIONS *********************************************************
  1082. //********************************************************************************************************************
  1083.  
  1084. //**  callExpand **************************************************************************************************
  1085. //  This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  1086. //  Called by: <A ID="expand" href="#">@@Hot text@@</A>
  1087. //  Followed by:  <div class="expand">
  1088.  
  1089. function callExpand(eventSrc) {
  1090.  
  1091. var e= eventSrc;
  1092.     event.returnValue = false;                    // prevents navigating for <A> tag
  1093.     
  1094. var oExpandable = getExpandable(e); 
  1095. var oImg = getImage(e);
  1096.  
  1097.      if (oExpandable.style.display == "block")
  1098.           doCollapse(oExpandable, oImg);
  1099.      else doExpand(oExpandable, oImg);
  1100. }
  1101.  
  1102. //** expandGoesHot *********************************************************************************************
  1103. // Returns expand image to hot. 
  1104.  
  1105. function expandGoesHot(eventSrc){
  1106. var e= eventSrc;
  1107. //alert(e.outerHTML);
  1108. var oExpandable = getExpandable(e);
  1109.   
  1110. var oImg = getImage(e);
  1111. //alert (oImg.src)
  1112. if (oExpandable == false){
  1113.     plus_or_minus = oImg.src.indexOf("minus")
  1114.     if (plus_or_minus == -1){
  1115.         //alert(plus_or_minus)
  1116.         oImg.src = closedHot
  1117.         }
  1118.     else
  1119.         {
  1120.         oImg.src = expandHot;
  1121.         //alert(plus_or_minus)
  1122.         }
  1123.      return;
  1124.     }
  1125.  
  1126. if (!isIE4){
  1127.    if (oExpandable.style.display == "block"){
  1128.             oImg.src = expandHot;
  1129.          //alert(oImg.src)
  1130.          }
  1131.    else oImg.src = closedHot;
  1132. }
  1133. }
  1134.  
  1135.  
  1136. //** expandGoesCold *********************************************************************************************
  1137. // Returns expand image to cold.
  1138.  
  1139. function expandGoesCold(eventSrc){
  1140. var e= eventSrc;
  1141.  
  1142. var oExpandable = getExpandable(e);
  1143. var oImg = getImage(e);
  1144. // alert (oImg.src)
  1145.  
  1146. if (oExpandable == false){
  1147.     plus_or_minus = oImg.src.indexOf("minus")
  1148.     
  1149.     if (plus_or_minus == -1){
  1150.         //alert(plus_or_minus)
  1151.         oImg.src = closed
  1152.         }
  1153.     else
  1154.         {
  1155.         oImg.src = expand;
  1156.         //alert(plus_or_minus)
  1157.         }
  1158.      return;
  1159.     }
  1160.  
  1161.  
  1162. if (!isIE4){
  1163.  if (oExpandable.style.display == "block") oImg.src = expand;
  1164.   else oImg.src = closed;
  1165. }  
  1166. }
  1167.  
  1168.  
  1169. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  1170. //  Determine if the element is an expandable node or a child of one.  
  1171.  
  1172. function getExpandable(eventSrc){
  1173. var  e = eventSrc;
  1174. var iNextTag, oExpandable;
  1175.     
  1176.        for (var i=1;i<4; i++){
  1177.                iNextTag=    e.sourceIndex+e.children.length+i;
  1178.               oExpandable= document.all(iNextTag);
  1179.               if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  1180.                   return oExpandable
  1181.                    break;
  1182.        }
  1183.        return false;
  1184.        
  1185. }
  1186.  
  1187. //**  getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  1188. //  Find the first image in the children of the current srcElement.   
  1189. // (allows the  image to be placed anywhere inside the <A HREF> tag)
  1190.  
  1191. function getImage(header) {
  1192. var oImg = header;
  1193.  
  1194.        if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  1195.        return oImg;
  1196. }
  1197.  
  1198.  
  1199. //****  expandAll *******************************************************************************************************
  1200. //  Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  1201. //  called by: <A HREF="#" onclick="expandAll();">expand all</A>
  1202.  
  1203. var stateExpand = false;    //applies to the page 
  1204.  
  1205. //**** ****************************************************************************************************************
  1206.  
  1207. function expandAll() {
  1208. var oExpandToggle, oImg;
  1209. var expandAllMsg = "expand all";                    //message returned when CloseAll() is invoked
  1210. var closeAllMsg = "close all";                        //message returned when ExpandAll() is invoked
  1211. var e= window.event.srcElement;
  1212.        event.returnValue = false;
  1213.  
  1214.        for (var i=0; i< document.anchors.length; i++){
  1215.                oExpandToggle = document.anchors[i];
  1216.          
  1217.                 if (oExpandToggle.id.toLowerCase() == "expand"){ 
  1218.                      oExpandable = getExpandable(oExpandToggle);  
  1219.                      oImg = getImage(oExpandToggle);
  1220.              
  1221.                      if (stateExpand == true) doCollapse(oExpandable, oImg);
  1222.                      else                     doExpand(oExpandable, oImg);
  1223.                 }
  1224.        }
  1225.        if (stateExpand == true) {
  1226.             stateExpand = false;
  1227.             e.innerText= expandAllMsg;
  1228.        }
  1229.        else {
  1230.             stateExpand = true;
  1231.             e.innerText= closeAllMsg;
  1232.        }
  1233. }
  1234.  
  1235.  
  1236. //****  doExpand *******************************************************************************************************
  1237. //  Expands expandable block & changes image
  1238.     
  1239. var redo = false;    
  1240. function doExpand(oToExpand, oToChange) {
  1241. var oExpandable= oToExpand;
  1242. var oImg= oToChange;
  1243.  
  1244. //    if (printing == "TRUE") return;
  1245.  
  1246.     oImg.src = expand;
  1247.     oExpandable.style.display = "block";
  1248.     
  1249.     if (!redo && isIE4) {
  1250.         // alert("what")
  1251.         redo = true;
  1252.         // focus(oToExpand);
  1253.         doExpand(oToExpand, oToChange);
  1254.         }
  1255.     }
  1256.  
  1257.  
  1258. //****  doCollapse *****************************************************************************************************
  1259. //  Collapses expandable block & changes image
  1260.     
  1261. function doCollapse(oToCollapse, oToChange) {
  1262. // if (printing == "TRUE") return;
  1263. var oExpandable= oToCollapse;
  1264. var oImg= oToChange;
  1265.  
  1266.     oExpandable.style.display = "none";
  1267.     oImg.src = closed;
  1268. }
  1269.  
  1270. //*******************************************************************************************************
  1271. //******* WEB  FUNCTIONS **************************************************************************
  1272. //*******************************************************************************************************
  1273.  
  1274. //**** callThumbnailWeb **************************************************************************************
  1275.  
  1276. function callThumbnailWeb(eventSrc) {
  1277. var e= eventSrc;
  1278.        event.returnValue = false;
  1279.                     
  1280. var thumbnailWin= window.open (e.href, "height=450, width=600, left=10, top=10, dependent=yes, resizable=yes, status=no, directories=no, titlebar=no, toolbar=yes, menubar=no, location=no","true");
  1281.  
  1282. thumbnailWin.document.write ("<html><head><title>Windows 2000</title></head><body><img src='"+e.href+"'></body></html>");
  1283.  
  1284. return;
  1285. }
  1286.  
  1287. //*********************************************************************************************************
  1288. //*********************************************************************************************************
  1289.                                 
  1290. var popupOpen= false;                //state of popups
  1291. var posX, posY;                        //coordinates of popups
  1292. var oPopup;                            //object to be used as popup content
  1293.  
  1294. //**** callPopupWeb **************************************************************************************
  1295. // the web popups have been converted from the object winHelp popup for the web.
  1296. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  1297. // followed by: <div class="popup">Popup content</div>
  1298.  
  1299.  
  1300. function callPopupWeb(eventSrc) {
  1301. var e= eventSrc;
  1302.   
  1303.   // find the popup <div> that follows <a id="wPopupWeb"></a>
  1304.   findPopup(e);
  1305.   if (!e.bite_me) positionPopup(e)
  1306.  
  1307.   oPopup.style.visibility = "visible";
  1308.   // document.focus(e)
  1309.   popupOpen = true;
  1310.  
  1311.   return;
  1312. }
  1313.  
  1314. //**** findPopup ****************************************************************************************
  1315.  
  1316. function findPopup(oX){
  1317. var e= oX;
  1318. var iNextTag;
  1319.     
  1320.     for (var i=1;i<document.all.length; i++){
  1321.          iNextTag=    e.sourceIndex + i;
  1322.          oPopup= document.all(iNextTag);
  1323.          if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  1324.              break;
  1325.     }
  1326.     
  1327.     if (iNextTag != document.all.length) {
  1328.         posX = window.event.clientX; 
  1329.         posY = window.event.clientY + document.body.scrollTop+10;
  1330.     }
  1331.     if (popupOpen) closePopup();
  1332. }
  1333.  
  1334.  
  1335. //****  positionPopup ************************************************************************************
  1336. // Set size and position of popup.
  1337. // If it is off the page, move up, but not past the very top of the page.
  1338.  
  1339. function positionPopup(oX){
  1340. var e= oX;    
  1341. var popupOffsetWidth = oPopup.offsetWidth;
  1342.  
  1343. //determine if popup will be offscreen to right
  1344. var rightlimit = posX + popupOffsetWidth;
  1345.  
  1346.   if (rightlimit >= document.body.clientWidth) 
  1347.       posX -= (rightlimit - document.body.clientWidth);
  1348.   if (posX < 0) posX = 0;
  1349.     
  1350. //position popup
  1351.   oPopup.style.top = posY;
  1352.   oPopup.style.left = posX;
  1353.  
  1354. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  1355. var popupHeight = oPopup.offsetHeight;
  1356.   
  1357.   if (popupHeight + posY >= pageBottom) {
  1358.       if (popupHeight <= document.body.clientHeight)
  1359.           oPopup.style.top = pageBottom - popupHeight;
  1360.       else
  1361.            oPopup.style.top = document.body.scrollTop;
  1362.   }
  1363. }
  1364.  
  1365. //**** closePopup ****************************************************************************************
  1366. // Close Popup
  1367. function closePopup() {
  1368.  
  1369.   oPopup.style.visibility = "hidden";
  1370.   popupOpen = false;
  1371.   return;
  1372. }
  1373.  
  1374.  
  1375. //*********************************************  GENERAL FUNCTIONS ************************************************
  1376. //**************************************************************************************************************************
  1377.  
  1378. //***ajustImg *************************************************************************************************************
  1379. // expands an image to the with of the window or shrinks it to 90px
  1380.  
  1381. function ajustImg(eventSrc) {
  1382. var e= eventSrc;
  1383. var fullWidth= document.body.offsetWidth;
  1384.  
  1385.     fullWidth = fullWidth - 50;
  1386.     if (e.style.pixelWidth==90)
  1387.          e.style.pixelWidth=fullWidth;
  1388.     else e.style.pixelWidth=90;
  1389. }
  1390.  
  1391.  
  1392. //**  getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  1393. // extracts the file location (CHM::/HTM) URL 
  1394.  
  1395. function getURL(sHREF) {
  1396. var spaces= /\s/g
  1397. var eH = unescape(sHREF);
  1398.     eH = eH.replace(spaces,""); 
  1399.  
  1400. var eH_= eH.toLowerCase();
  1401. var sParamFILE= "";
  1402. var sParamCHM= "";
  1403.  
  1404. var iFILE= eH_.lastIndexOf("file=");
  1405.     if (iFILE!=-1){
  1406.         iEND= iFILE +1;
  1407.         sParamFILE = eH.substring(iFILE+5,eH.length);
  1408.     }
  1409.  
  1410. var iCHM  = eH_.lastIndexOf("chm=");
  1411.  
  1412. gifwithin = false; 
  1413. if (gifwithin){
  1414.     gifwithin = false;
  1415.     var con_mmc;
  1416.     var doc_mmc;
  1417.     doc_mmc = " " + document.location;
  1418.     doc_mmc = doc_mmc.toLowerCase();
  1419.     if (iCHM!=-1){
  1420.         iEND  = iCHM +1;                             // iEND used by callShortcut
  1421.         sParamCHM = eH.substring(iCHM+4, iFILE);
  1422.         con_mmc = doc_mmc.indexOf(sParamCHM);
  1423.             if (con_mmc != -1){
  1424.                 sParamCHM = "";
  1425.                 iCHM = -1;
  1426.             sParamFILE= sParamCHM+sParamFILE;    
  1427.             }
  1428.         }
  1429.     }
  1430.  
  1431.      if (iCHM!=-1){
  1432.         iEND  = iCHM +1;                             // iEND used by callShortcut
  1433.         sParamCHM = eH.substring(iCHM+4, iFILE);
  1434.         sParamFILE= sParamCHM+"::/"+sParamFILE;    
  1435.         }    
  1436.     return sParamFILE;
  1437. }
  1438. //****************************************************************************************************************************
  1439. //********************************************  IE5 PERSISTENCE  *************************************************************
  1440. //****************************************************************************************************************************
  1441.  
  1442. var oTD,iTD;         // persistence
  1443.  
  1444. //****** Persistence for userData ********************************************************************************************* 
  1445.  
  1446. function getChecklistState(){ 
  1447.  
  1448.  var pageID= addID();
  1449.  
  1450.     if (checklist.all== "[object]") {
  1451.     oTD=checklist.all.tags("INPUT");
  1452.     iTD= oTD.length;
  1453.         }
  1454.     else
  1455.         {
  1456.         printing = true;
  1457.         isPersistent = false;
  1458.         return;
  1459.         }
  1460.  
  1461.     if (iTD == 0){
  1462.         printing = true;
  1463.         isPersistent = false;
  1464.         return;
  1465.         }
  1466.     
  1467. // routine added to fix a bug in the ocx 06/14/99    
  1468.      lct = document.location + ".";
  1469.      xax = 10;
  1470.      xax = lct.indexOf("mk:@MSITStore");
  1471.      if (xax != -1) {
  1472.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  1473.         // alert("before reload : " + document.location);
  1474.         // alert("replace with : " + lct);
  1475.         isPersistent = false;
  1476.         document.location.replace(lct);
  1477.         isPersistent = true;
  1478.         // alert("after reload : " + document.location);
  1479.         }     
  1480.      else
  1481.          {      
  1482.          checklist.load("oXMLStore");
  1483.         }
  1484. // routine added to fix a bug in the ocx 06/14/99
  1485.     if (checklist.getAttribute("sPersist"+pageID+"0"))    
  1486.     for (i=0; i<iTD; i++){
  1487.  
  1488.          if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  1489.          checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  1490.         
  1491.          if (checkboxValue=="yes") oTD[i].checked=true;
  1492.          else oTD[i].checked=false;
  1493.          }// if
  1494.          if (oTD[i].type =="text")              
  1495.               oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  1496.      }// for
  1497. } // end persistence
  1498.  
  1499. //**  saveChecklistState *************************************************************************************************************
  1500. function saveChecklistState(){
  1501. var pageID= addID(); 
  1502.  
  1503.         if (!isPersistent) return; 
  1504.          //  you will need this           document.location
  1505.         for (i=0; i<iTD; i++){
  1506.  
  1507.                 if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  1508.                  if (oTD[i].checked) checkboxValue="yes";
  1509.                  else checkboxValue="no";
  1510.                  
  1511.                  checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  1512.              }// if
  1513.             
  1514.               if (oTD[i].type =="text") 
  1515.                  checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  1516.          }    // for
  1517.  
  1518.  // routine added to fix a bug in the ocx 06/14/99    
  1519.      lct = document.location + ".";
  1520.      xax = 10;
  1521.      xax = lct.indexOf("mk:@MSITStore");
  1522.      if (xax != -1) {
  1523.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  1524.         // alert("before reload : " + document.location);
  1525.         // alert("replace with : " + lct);
  1526.         isPersistent = false;
  1527.         document.location.replace(lct);
  1528.         isPersistent = true;
  1529.         // alert("after reload : " + document.location);
  1530.         }     
  1531.      else
  1532.          {      
  1533.          checklist.save("oXMLStore");
  1534.         }
  1535. // routine added to fix a bug in the ocx 06/14/99
  1536.      
  1537. }//end function
  1538.  
  1539. //**  resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  1540. //  resize the page when the <div class=nav></div> && <div class=text></div> are found
  1541. function resizeDiv(){
  1542. if (printing == true) return;
  1543. var oNav = document.all.item("nav");
  1544. var oText= document.all.item("text");
  1545.  
  1546.     if (popupOpen) closePopup();
  1547.     if (oText == null) return;
  1548.     if (oNav != null){
  1549.         document.all.nav.style.width= document.body.offsetWidth;
  1550.         document.all.text.style.width= document.body.offsetWidth-4;
  1551.         document.all.text.style.top= document.all.nav.offsetHeight;
  1552.         if (document.body.offsetHeight > document.all.nav.offsetHeight)
  1553.             document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  1554.          else document.all.text.style.height=0; 
  1555.   }
  1556. }
  1557. //**  addID *************************************************************************************************************
  1558. function addID(){
  1559.  
  1560. var locID = document.location.href; 
  1561. var iHTM = locID.lastIndexOf(".htm");
  1562. var iName=locID.lastIndexOf("/");
  1563.       locID = locID.substring(iName+1,iHTM);
  1564.     
  1565.     return locID;
  1566. }    
  1567. //** set_to_print ***************
  1568. function set_to_print(){
  1569.     // alert(printing)
  1570.     if (printing == true) return
  1571.     var i;
  1572.     
  1573.  
  1574. var isIE5 = (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  1575. var isIE55 = (navigator.appVersion.indexOf("MSIE 5.5")>0);
  1576. if (isIE5 && isIE55) isIE5 = false;
  1577. var isIE6 = (navigator.appVersion.indexOf("MSIE 6")>0);
  1578. var isIE4 = (navigator.appVersion.indexOf("MSIE 4")>0);
  1579.  
  1580. if (!isIE5 && !isIE55 && !isIE4 && !isIE6) {
  1581.     isIE6 = true;
  1582.     }
  1583.  
  1584.  
  1585. // trying    
  1586.  
  1587. printing = true;
  1588.  
  1589.  if (isIE55){
  1590.      addReusableText();
  1591.      insertImages_4_print();
  1592.      }
  1593. if (isIE6){
  1594.     addReusableText();
  1595.      insertImages_4_print();
  1596.     }
  1597.  
  1598. // to fix printing
  1599.  
  1600.  
  1601.  
  1602. isPersistent= (document.all.item("checklist")!=null) && ((isIE5) || (isIE6) || (isIE55));
  1603.  setPreviousNext();
  1604.  resizeDiv();
  1605. // if (isPersistent) getChecklistState();
  1606.  
  1607.  
  1608.     if (window.text) {
  1609.         if (!window.text.style){
  1610.             scroller = "FALSE";
  1611.             }
  1612.         else
  1613.             {
  1614.             document.all.text.style.height = "auto";
  1615.             scroller = "TRUE";
  1616.             }
  1617.         }
  1618.     
  1619. var thisLoc= document.location.href;
  1620.     thisLoc = thisLoc.indexOf("glossary.htm")
  1621.     if (thisLoc != -1){
  1622.         return;
  1623.         }
  1624.     // alert("in print")
  1625.     
  1626.     // alert(isIE6)
  1627.     for (i=0; i < document.all.length; i++){
  1628.         if (document.all[i].id == "expand") {
  1629.             // callExpand(document.all[i]);         // no longer needed since the coua_print.css does this now.
  1630.             single = "TRUE";
  1631.             }
  1632.         if (document.all[i].tagName == "BODY") {
  1633.             document.all[i].scroll = "auto";
  1634.             }
  1635.         if (document.all[i].tagName == "A" && scroller != "TRUE") {
  1636.             joe = " " + document.all[i].outerHTML
  1637.             joe = joe.toLowerCase();
  1638.             joe = joe.indexOf("href=")
  1639.             if(joe == -1){
  1640.                 document.all[i].outerHTML = "<A NAME=''>" + document.all[i].innerHTML + "</a>";
  1641.                 }
  1642.             else
  1643.                 {
  1644.                 document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1645.                 }
  1646.             }
  1647.         }
  1648.         
  1649. // reset_form();
  1650.     
  1651. }
  1652. //** used to reset a page if needed ********************
  1653. function reset_form(){
  1654.     printing = false;
  1655.     document.location.reload();
  1656. }
  1657.  
  1658.     
  1659. //** on error routine *********************************
  1660. function errorHandler() {
  1661.  //  alert("Error Handled");
  1662.   return true;
  1663. }
  1664.  
  1665. // ******************************* this function is to help ie55 and ie6 to print these images  ******
  1666. booking = false;
  1667. function insertImages_4_print(){
  1668.  
  1669. window.onerror = errorHandler
  1670. // if (isIE6) return
  1671. // if (isIE55) return
  1672. if (!printing) booking = true;
  1673. if (printing == true && booking == true ) {
  1674.     booking = false;
  1675.     return;
  1676.     }
  1677.  
  1678.  
  1679.  var collP = document.all.tags("P");
  1680.   
  1681.   for (var i=0; i<collP.length; i++) {
  1682.        if (collP[i].className.toLowerCase()=="note")            collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " +     collP[i].innerHTML;
  1683.        else if (collP[i].className.toLowerCase()=="warning")    collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " +  collP[i].innerHTML;
  1684.        else if (collP[i].className.toLowerCase()=="caution")    collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " +  collP[i].innerHTML;
  1685.        else if (collP[i].className.toLowerCase()=="tip")        collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " +      collP[i].innerHTML;
  1686.        else if (collP[i].className.toLowerCase()=="important")  collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  1687.        else if (collP[i].className.toLowerCase()=="empty")      collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " +    collP[i].innerHTML;
  1688.        if (collP[i].className.toLowerCase()=="reltopics" && rel_gif == "yes")  {
  1689.             collP[i].outerHTML ="<img class='relTopics' src='"+relTopicsImg+"'> " + collP[i].outerHTML;
  1690.             }   
  1691.           }
  1692.   
  1693. //alert(printing)
  1694. //alert(isIE55)
  1695. //indents for Navigation Tree 
  1696. var collUL = document.all.tags("UL");
  1697. if (!printing) {
  1698. for (var i=0; i<collUL.length; i++) {
  1699.        var indent= 0;
  1700.        if (collUL[i].className.toLowerCase()=="navtree"){
  1701.            if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  1702.            else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  1703.              for (var j = 0; j < collUL[i].children.length; j++)
  1704.                 if (collUL[i].children[j].className.toLowerCase()=="branch"){
  1705.                     if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  1706.                     else   collUL[i].children[j].style.marginLeft= (indent +'em');
  1707.                     indent= indent + 0.75;
  1708.                 }
  1709.       }
  1710. }
  1711. }
  1712.    
  1713.   for (var i=0; i < document.anchors.length; i++){
  1714.          var imgInsert="";  
  1715.          var imgStyle= "";
  1716.          var imgSpace= "<span class='space'></span>";      
  1717.          var oBefore=document.anchors[i].parentElement.tagName;
  1718.          var oAnchor= document.anchors[i].id.toLowerCase();
  1719.          
  1720. // insert RELTOPICS icons
  1721.     if (rel_gif == "yes"){
  1722.        if (oAnchor=="reltopics")
  1723.                if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  1724.                     imgInsert= "";    // not to re-insert when persistent
  1725.             else  imgInsert= "<img class='relTopics' src='"+relTopicsImg+"'>" + imgSpace;
  1726.         }
  1727.         
  1728. // insert SHORTCUT icons
  1729.        if (oAnchor=="shortcut") {    
  1730.             document.anchors[i].title= sShortcutTip;     
  1731.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  1732.                     imgInsert= "";    // not to re-insert when persistent
  1733.             else  imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  1734.         }    
  1735.                       
  1736. // insert POPUP icons
  1737.        else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  1738.        else if (document.anchors[i].className.toLowerCase()=="popupicon")
  1739.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  1740.                    imgInsert= "";    // not to re-insert when persistent
  1741.             else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  1742.  
  1743. // insert EXPAND icons 
  1744.        else if (oAnchor=="expand") {
  1745.               document.anchors[i].title= sExpandTip;
  1746.               if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  1747.                   imgInsert= "";     // not to re-insert when persistent      
  1748.               else{ 
  1749.                   if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  1750.                       imgSpace= "<span class='space' style='width:0'></span>";     
  1751.                       if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em";  imgStyle=" style=margin-right:'-1.5em'";}
  1752.                       else { document.anchors[i].parentElement.style.marginLeft= "1.5em";  imgStyle=" style=margin-left:'-1.5em'";}
  1753.                   }      
  1754.                   imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  1755.               }
  1756.        }
  1757.  
  1758.  
  1759.  
  1760. // insert thumbnail images       
  1761.        else if (oAnchor=="thumbnail"  || oAnchor=="thumbnailweb"){ 
  1762.             var sAltText = document.anchors[i].innerHTML;
  1763.             gifwithin = true;
  1764.             var sThumbnailText = document.anchors[i].title; 
  1765.             var oImg = document.anchors[i].href.toLowerCase();
  1766.                   if (oAnchor=="thumbnail") 
  1767.                          var sThumbnailImg= moniker + getURL(oImg);
  1768.                   else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  1769.                   
  1770.                  found = sAltText.indexOf("BACKGROUND-COLOR:")
  1771.             if (found != -1) {
  1772.                 stop_p = sAltText.indexOf(">");
  1773.                 sAltText = sAltText.substring(stop_p + 1, sAltText.length);
  1774.                 stop_p = sAltText.indexOf("</FONT>");
  1775.                 Highlighted = sAltText.substring(0,stop_p)
  1776.                 sAltText = Highlighted + sAltText.substring(stop_p + 7, sAltText.length);
  1777.                 }
  1778.  
  1779.                   
  1780.                 document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  1781.                 document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  1782.                 
  1783.                   if (isRTL) thumbDiv.style.styleFloat= "right";
  1784.            }
  1785.            
  1786.         
  1787.         
  1788.         document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  1789.        if (isRTL) document.anchors[i].dir="rtl";
  1790.    }
  1791. }
  1792.  
  1793. //** quad method code --  Witten by Randy Feinger, morphed to work inside of shared.js
  1794. function QuadDocumentMouseOver()
  1795. {
  1796.     var elem = event.srcElement;
  1797.     
  1798.     // If the first childe of the source element is a radio button and 
  1799.     // the parent element isn't grayed, change the cursor to a hand
  1800.     // or back to the original as appropriate.
  1801.     if (elem != null && elem.firstChild != null && 
  1802.         elem.firstChild.tagName != null &&
  1803.         elem.firstChild.tagName.toLowerCase() == "input" && 
  1804.         elem.firstChild.type.toLowerCase() == "radio" && 
  1805.         elem.parentElement.className != "indentGray")
  1806.     {
  1807.         if (elem.style.cursor == "hand")
  1808.             elem.style.cursor = "auto";
  1809.         else
  1810.             elem.style.cursor = "hand";
  1811.     }
  1812. }
  1813.  
  1814. function QuadDocumentClick()
  1815. {
  1816.     // Don't process clicks on grayed text.
  1817.     if (event.srcElement.parentElement.className == "indentGray")
  1818.         return;
  1819.     
  1820.     // INPUT elements should be wrapped by another element such as a SPAN, DIV, or P.
  1821.     var elem = event.srcElement.firstChild;
  1822.     
  1823.     // If this is a radio button...
  1824.     if (elem != null && elem.tagName != null && elem.tagName.toLowerCase() == "input" && elem.type == "radio")
  1825.     {
  1826.         // check it.
  1827.         elem.checked = true;
  1828.     }
  1829.     else
  1830.     {    
  1831.         // Otherwise, set elem to the event's source element.
  1832.         elem = event.srcElement;
  1833.     }
  1834.     
  1835.     // Call OnElementClick() and pass in the source element, and the name token
  1836.     // used to mark a top-level clickable element such as a radio button.
  1837.     OnElementClick(elem, "row1");
  1838. }
  1839.  
  1840.  
  1841.  
  1842. function OnElementClick(srcElem, token)
  1843. {
  1844.     var elemTagName = srcElem.tagName;                        // Tag name of the source element.
  1845.     var collElements1 = document.all.item(srcElem.name);    // Collection of elements with the same name property as the source element.
  1846.     var n = srcElem.sourceIndex;                            // The source index of the source element.
  1847.     var elemGroup = srcElem.group;                            // The (dynamic) group property for the source element.
  1848.     var elemID = srcElem.id;                                // The source element's ID.
  1849.     var i, j, k;                                            // Loop variables.
  1850.     
  1851.     // If there are no elements with the same name as the source element, or
  1852.     // if the source element isn't part of a group, exit the function.
  1853.     if (collElements1 == null || elemGroup == null || collElements1.length == null)
  1854.         return;
  1855.     
  1856.     // Make sure the source element's name contains the designated token
  1857.     // so we know it's top-level element that should be processed.
  1858.     if (srcElem.name.toLowerCase().indexOf(token) != -1)
  1859.     {
  1860.         // Loop through the collection of 
  1861.         for (i = 0; i < collElements1.length; i++)
  1862.         {
  1863.             // Go up one level and then down a level in the element hierarchy to find
  1864.             // the container (parent) element for the clickable sub-elements (radio buttons).
  1865.             var oNextElement = collElements1(i).parentElement.nextSibling;
  1866.             
  1867.             // If there is no such element, get the next element in the collection.
  1868.             if (oNextElement == null || oNextElement.tagName == null)
  1869.                 continue;
  1870.             
  1871.             // Get the collection of all the elements within the container element that 
  1872.             // have the same tag name as the source element.
  1873.             var collElements2 = oNextElement.all.tags(elemTagName);
  1874.             
  1875.             // Make sure the collection is valid.
  1876.             if (collElements2 == null || collElements2.length == 0)
  1877.                 continue;
  1878.  
  1879.             // Loop through the collection of sub-elements within the container element.
  1880.             for (j = 0; j < collElements2.length; j++)
  1881.             {
  1882.                 // If the current element in the collection is not the
  1883.                 // source element, disable it and make the text gray.
  1884.                 if (collElements1(i).sourceIndex != n)
  1885.                 {
  1886.                     oNextElement.className = "indentGray"
  1887.                     collElements2(j).disabled = true;
  1888.                 }
  1889.                 else    // Otherwise, enable the element and make the text black.
  1890.                 {
  1891.                     oNextElement.className = "indentBlack"
  1892.                     collElements2(j).disabled = false;
  1893.                     
  1894.                     // Set the ID for the checked (selected) element for use below.
  1895.                     if (collElements2(j).tagName.toLowerCase() == "input" && 
  1896.                         collElements2(j).type.toLowerCase() == "radio" && 
  1897.                         collElements2(j).checked == true)
  1898.                     {
  1899.                         elemID = collElements2(j).id;
  1900.                     }
  1901.                 }
  1902.             }
  1903.         }
  1904.     }
  1905.     
  1906.     // Get the collection of all of the elements with the same tag name as that
  1907.     // of the source element.
  1908.     var collElements2 = document.all.tags(elemTagName);
  1909.         
  1910.     // Make sure the collection is valid.
  1911.     if (collElements2 == null || collElements2.length == 0)
  1912.         return;
  1913.         
  1914.     // Loop through the collection of elements.
  1915.     for (i = 0; i < collElements2.length; i++)
  1916.     {
  1917.         // Get the collection of all elements with the same ID as the
  1918.         // current item in the collection.
  1919.         var collAssocElems = document.all(collElements2(i).id);
  1920.                 
  1921.         // Make sure the collection is valid.
  1922.         if (collAssocElems == null || collAssocElems.length == 0)
  1923.             continue;
  1924.             
  1925.         // Loop through the collection of same-named elements.
  1926.         for (j = 0; j < collAssocElems.length; j++)
  1927.         {
  1928.             // If the tag name for the current element is different than that for the source element,
  1929.             // and the current element is part of the same group as the source element, 
  1930.             // hide or display the element as appropriate.
  1931.             if (collAssocElems(j).tagName != elemTagName && collAssocElems(j).group == elemGroup)
  1932.             {
  1933.                 // Hide the element unless the current element's ID matches the ID of the element
  1934.                 // that has been checked (selected).
  1935.                 collAssocElems(j).style.display = ((collAssocElems(j).id == elemID) ? "block" : "none")
  1936.             }
  1937.         }
  1938.     }
  1939. }
  1940.  
  1941.